package com.cm.server.cmone.repository;

import com.cm.server.cmone.entity.MenuItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MenuItemRepository extends JpaRepository<MenuItem, Long> {
    List<MenuItem> findByKey(String key);
    List<MenuItem> findByLabelContaining(String label);
    List<MenuItem> findByIcon(String icon);
    List<MenuItem> findByChildrenIsNull();
    List<MenuItem> findByChildrenIsNotNull();
}